/*
 * SpaceBattleInterface.h
 *
 *  Created on: Oct 23, 2011
 *      Author: gonzalo
 */

#ifndef SpaceBattleINTERFACE_H_
#define SpaceBattleINTERFACE_H_

#include <string>
#include <list>
#include "../SDLtoolkit/Asteroide.h"
#include "../common/DTOCliente.h"
#include "../common/DTOImage.h"
#include "ColaMensajes.h"
#include "../SDLtoolkit/widgets/ShipStatus.h"

class SpaceBattleInterface {
public:
	SpaceBattleInterface(std::string owner);
	SpaceBattleInterface(std::string scenarioName,bool);
	virtual ~SpaceBattleInterface();

	std::list<Asteroide*> getAsteroides();
	std::list< std::pair<std::string,std::string>* >* getShips();

	ShipStatus* getShip();

	void setAsteroides(std::list<DTOAsteroide*> listElements);
	void setShipStatus(ShipStatus* shipStatus);

	void clearListDTOAsteroides();
	void clearListAsteroides();

	void setPlayScenarioDimensions(int width,int height);

	std::string getOwner();

    int getHeight() const;
    int getWidth() const;
    DTO* getDTOMensaje();
    void setDTOMensaje(DTO* dtoMensaje);

    void resetClientInterface();

private:
    void readXML();
    std::list<Asteroide*> duplicateAsteroids();
    void removeImages();
    std::string owner;
    std::string scenarioName;
    bool esServer;
    std::list<DTOAsteroide*> listDTOAsteroides;
    std::list<Asteroide*> listAsteroides;
    ShipStatus *shipStatus;
    int width;
    int height;
    std::list<DTO*> dtoMensajes;
};

#endif /* SpaceBattleINTERFACE_H_ */
